﻿@{ Layout = "~/Views/Shared/_leftPanelLayout.cshtml";}
@section LeftTree
{
     
    @{
        Html.RenderPartial("SettingsTreePartialView");
     }
}

<div id="list-dept">
    @Html.Action("SettingsPartialView")
</div>


<br />
 @Html.DevExpress().Button(settings =>
{
    settings.Name = "btnAdd";  
    settings.Text = "增加参数";
    settings.Width = 100;
    settings.ControlStyle.CssClass = "button1";
    settings.ClientSideEvents.Click = "function(s, e){add(); }";
}).GetHtml()
<script type="text/javascript">
    var deptId = null;
    var superid = null;
    function edit(id) {
        deptId = id;
        pcModalMode.Show();
    }
    function OnBeginCallback(s, e) {
        if (deptId != null) {
            e.customArgs["id"] = deptId;
        }
        if (superid != null) {
            e.customArgs["superid"] = superid;
        }
        deptId = null;
        superid = null;
    }
    function add() {
        superid = '@Html.ViewContext.RouteData.Values["id"]';
        pcModalMode.Show();
    }
    function OnEndCallback(s, e) {
    }
</script>



@Html.DevExpress().PopupControl(
settings =>
{
    settings.Name = "pcModalMode";
    settings.CallbackRouteValues = new { Controller = "System", Action = "EditSetting" };
    settings.Width = 410;
    settings.Height = 200;
    settings.InitDefaultSettings();
    
    settings.HeaderText = "参数编辑";
}).GetHtml()
